package com.example.kevin.entity;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

@Slf4j
public class Task implements Callable<String> {
    private CountDownLatch start;

    public Task(CountDownLatch start) {
        this.start = start;
    }

    @Override
    public String call() throws Exception {
        this.start.await(1, TimeUnit.MILLISECONDS);
        log.info("task  ");
        return "Task Done";
    }
}